/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package 解析.node.slicenode;

import 解析.node.node.Node;
import 解析.node.others.TreeInfo;

/**
 *
 * @author yanxi
 */
public class SliceNode extends Node { 
    public int[] buffer;

    SliceNode(int[] buf) {
        buffer = buf; 
    }
    
    @Override
    public boolean study(TreeInfo info) {
        info.minLength += buffer.length;
        info.maxLength += buffer.length;
        return next.study(info);
    } 
    
    @Override
    public String toString(){
        //return "["+this.getClass().getName()+"]"+new String(buffer, 0, buffer.length);
        return new String(buffer, 0, buffer.length);
    }
}
